<script setup lang="ts">
import { ref } from 'vue';
import { EImageUtil } from 'exploria-ui';

const src = ref<string>(new URL('./author_avatar.png', import.meta.url).href);
const mirror = () => {
    EImageUtil.mirror(src.value).then((res) => {
        src.value = URL.createObjectURL(res);
    });
};
</script>

<template>
    <div class="using">
        <button @click="mirror">镜像图片</button>
        <img :src="src" alt="" />
    </div>
</template>

<style scoped lang="scss">
img {
    height: 100px;
}
</style>
